package cn.wolfcode.service;


import cn.wolfcode.domain.Employee;
import cn.wolfcode.qo.EmployeeQueryObject;
import com.github.pagehelper.PageInfo;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.multipart.MultipartFile;


import java.io.IOException;
import java.util.List;

public interface IEmployeeService {
    void delete(Long id);

    void save(Employee employee, Long[] ids);

    Employee get(Long id);

    List<Employee> listAll();

    void update(Employee employee, Long[] ids);

    //分页查询的方法
    PageInfo<Employee> query(EmployeeQueryObject qo);

    //登录,查询员工账号密码
   //Employee login(String username,String Password);


    //重置密码
    void resetPwdPage(String newPassword, Long id);

    //修改密码
    void updatePwdPage(String oldPassword, String newPassword, Long id);

    //批量删除
    void batchDelete(Long[] ids);

    //远程验证
    //验证用户名是否存在
    Employee selectByName(String name);

    //导出
    Workbook exportXls();

    //导入
    void importXls(MultipartFile file) throws IOException;

    //禁用/恢复账号功能
    void updateStatus(Long id, int status);

    //根据角色编码查询员工,...可变参数,可自动封装成数组
    List<Employee> selectByRoleSn(String... sns);
}
